package com.sojson.project.sys.log.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sojson.project.sys.log.dao.LogLoginDao;
import com.sojson.project.sys.log.entity.dto.LogLoginDto;
import com.sojson.project.sys.log.entity.dto.LogLoginPageDto;
import com.sojson.project.sys.log.entity.po.LogLogin;
import com.sojson.project.sys.log.entity.vo.LogLoginVo;
import com.sojson.project.sys.log.service.LogLoginService;

/**
 * 系统访问记录Service实现类
 * 
 * @author liu
 * @date 2022-10-24
 */
@Service
public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLogin> implements LogLoginService {

    @Resource
    private LogLoginDao logLoginDao;

    /**
     * 通过对象查找
     * 
     * @param dto
     * @return
     */
    @Override
    public List<LogLoginVo> list(LogLoginDto dto) {
        List<LogLoginVo> list = logLoginDao.list(dto);
        return list;
    }

    /**
     * 通过对象分页查找
     * 
     * @param dto
     * @return
     */
    @Override
    public List<LogLoginVo> page(LogLoginPageDto dto) {
        List<LogLoginVo> page = logLoginDao.page(dto);
        return page;
    }

    /**
     * 通过对象删除
     * 
     * @param dto
     * @return
     */
    @Override
    public boolean removeByDto(LogLoginDto dto) {
        logLoginDao.removeByDto(dto);
        return true;
    }

    /**
     * 清空数据
     * 
     * @return
     */
    @Override
    public boolean clear() {
        logLoginDao.clear();
        return true;
    }

    /**
     * 通过id查找
     * 
     * @param id
     * @return
     */
    @Override
    public LogLoginVo findById(String id) {
        LogLoginVo findById = logLoginDao.findById(id);
        return findById;
    }

}